/**
 * Created by HP on 2017/11/2.
 */
import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export const store = new Vuex.Store({
	//状态
	state:{
		login:false,
		modal8:false,
		value:{}
	},
	//获取状态
	getters:{
		login:state=>{
			return state.login
		},
		modal8:state=>{
			return state.modal8
		},
		value:state=>{
			return state.value
		}
	},
	//修改状态
	mutations:{
		checkLogin:(state,playload)=>{
			state.login = playload
		},
		checkmodal8:(state,playload)=>{
			state.modal8 = playload
		},
		checkvalue:(state,playload)=>{
			state.value = playload
		}
	},
	//异步分发
	actions:{
		checkLogin:({commit},playload)=>{
			commit('checkLogin',playload)
		},
		checkmodal8:({commit},playload)=>{
			commit('checkmodal8',playload)
		},
		checkvalue:({commit},playload)=>{
			commit('checkvalue',playload)
		}
		
	}
})